package acm.pta9;

import java.util.Scanner;

public class 吃鱼吃肉 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0){
            boolean sex=sc.nextInt()==1;
            int h = sc.nextInt();
            int w = sc.nextInt();
            if (sex){
                printH(130,h);
                printW(27,w);
            }else {
                printH(129,h);
                printW(25 ,w);
            }
        }
    }

    public static void printH(int h,int a){
        if (a>h){
            System.out.print("ni li hai!");
        }else if (a<h){
            System.out.print("duo chi yu!");
        }else {
            System.out.print("wan mei!");
        }
        System.out.print(" ");
    }
    public static void printW(int w,int b){
        if (b>w){
            System.out.println("shao chi rou!");
        }else if (b<w){
            System.out.println("duo chi rou!");
        }else {
            System.out.println("wan mei!");
        }
    }
}
